package com.miracle.main.module.di.module;

import com.miracle.basemvp.di.scope.ActivityScope;
import com.miracle.main.adapter.FileListAdapter;
import com.miracle.main.module.mvp.contract.FileListContract;
import com.miracle.main.module.mvp.entity.bean.FileItem;
import com.miracle.main.module.mvp.model.FileListModel;

import java.util.ArrayList;

import dagger.Module;
import dagger.Provides;

/**
 * com.miracle.main.module.di.module
 * (c)2018 AIR Times Inc. All rights reserved.
 *
 *
 * @author WangJQ
 * @version 1.0
 * @date 2018/7/11 10:21
 * @see com.miracle.main.module.di.module
 */
@ActivityScope
@Module
public class FileListModule {
    private FileListContract.View mView;

    public FileListModule(FileListContract.View view) {
        mView = view;
    }

    @ActivityScope
    @Provides
    FileListContract.View provideListView() {
        return mView;
    }

    @ActivityScope
    @Provides
    FileListContract.Model provideListModel(FileListModel model) {
        return model;
    }

    @ActivityScope
    @Provides
    ArrayList<FileItem> provideFileList() {
        return new ArrayList<>();
    }

    @ActivityScope
    @Provides
    FileListAdapter provideFileAdapter(ArrayList<FileItem> list) {
        return new FileListAdapter(list);
    }
}
